import type { App } from 'vue'
import type { SFCWithInstall } from '@/utils/types'
import { loadAsyncComponent } from '@/utils/async-component'
import {{ pascalCase name }} from './src/index.vue'

{{ pascalCase name }}.install = (app: App): void => {
  app.component('V{{ pascalCase name }}', {{ pascalCase name }})
  app.component('V{{ pascalCase name }}Prop', loadAsyncComponent(() => import('./src/config.vue')))
}

export default {{ pascalCase name }} as SFCWithInstall<typeof {{ pascalCase name }}>
